package io.persimmon.core.module.calculation;

import java.util.function.Consumer;

public interface Calculation<R, D> {
    void accept(D data);

    R calculationResult();

    default Consumer<R> getResultConsumer() {
        return null;
    }

    default void setResultConsumer(Consumer<R> consumer) {

    }

    void clean();
}
